<template>
  <div class="settle-in-network">
    <div class="area-tab">
      <div :class="{'each-tab': true, 'is-active': nowTab === item.value}"
           v-for="(item, index) in tabList"
           :key="'settleInTabList' + index"
           @click="changeTab(item.value)">{{item.label}}</div>
    </div>
    <div class="network-exhibition">
      <!--<div class="each-exhibition" v-for="item in 20" :key="'exhibition' + item">-->
      <!--<div class="exhibition-picture">-->

      <!--</div>-->
      <!--<div class="exhibition-name">来广营德通服务中心</div>-->
      <!--<div class="exhibition-area">北京</div>-->
      <!--</div>-->
    </div>
  </div>
</template>

<script>
export default {
  data () {
    return {
      tabList: [
        {
          label: '全部',
          value: ''
        },
        {
          label: '北京',
          value: '北京'
        },
        {
          label: '上海',
          value: '上海'
        },
        {
          label: '广州',
          value: '广州'
        },
        {
          label: '深圳',
          value: '深圳'
        }
      ],
      nowTab: ''
    }
  },
  methods: {
    changeTab (val) {
      if (val !== this.nowTab) {
        this.nowTab = val;
      }
    }
  }
}
</script>

<style lang="less" scoped>
.settle-in-network {
  .mainViewAreaStyle();
  overflow: hidden;
  margin-bottom: 59px;

  .area-tab {
    overflow: hidden;
    margin-bottom: 7px;

    .each-tab {
      width: 80px;
      height: 32px;
      font-size: 14px;
      display: inline-block;
      margin: 0 16px 16px 0;
      text-align: center;
      border: 1px solid @greyBorder;
      line-height: 30px;
      border-radius: 3px;
      -webkit-box-sizing: border-box;
      -moz-box-sizing: border-box;
      box-sizing: border-box;
      cursor: pointer;
      .textOverflow();
      .userUnSelect();

      &.is-active {
        border: 1px solid @activeRed;
        background: @activeRed;
        color: #fff;
      }
    }
  }

  .network-exhibition {
    min-height: 200px;
    overflow: hidden;

    .each-exhibition {
      width: 286px;
      height: 248px;
      background: @greyBackground;
      display: inline-block;
      -webkit-box-sizing: border-box;
      -moz-box-sizing: border-box;
      box-sizing: border-box;
      margin: 0 16px 16px 0;
      padding-top: 8px;
      text-align: center;

      &:nth-child(4n) {
        margin-right: 0;
      }

      .exhibition-picture {
        width: 270px;
        height: 174px;
        background: #fff;
        margin: 0 auto 15px;
      }

      .exhibition-name {
        height: 14px;
        font-size: 14px;
        font-weight: 400;
        color: @colorCommonFont;
        line-height: 14px;
        margin-bottom: 8px;
      }

      .exhibition-area {
        height: 12px;
        opacity: 1;
        font-size: 12px;
        font-weight: 400;
        color: @colorGreyFont;
        line-height: 12px;
      }
    }
  }
}
</style>
